package com.smart.manager.pop.entities.models;

import com.smart.common.entities.core.BaseLongModel;
import com.smart.common.entities.file.UploadResult;
import com.smart.manager.pop.entities.views.DisLevelView;
import io.ebean.annotation.DbJson;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;


/**
 * 渠道代理
 *
 * @author Administrator
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@Accessors(chain = true)

public class PopDisInviter extends BaseLongModel {


    @ApiModelProperty(value = "头像地址")
    private String avatar;

    @ApiModelProperty(value = "分销员手机")
    private String phone;

    @ApiModelProperty(value = "经理姓名")
    private String name;

    @ApiModelProperty("微信名称")
    private String realName;   //==

    @ApiModelProperty(value = "当前等级")
    @ManyToOne
    @JoinColumn(name = "level", referencedColumnName = "id")
    private DisLevelView level;



    @ApiModelProperty(value = "佣金余额")
    private BigDecimal amount;

    @ApiModelProperty(value = "累计佣金")
    private BigDecimal amountCont;

    @ApiModelProperty(value = "支付押金")
    private BigDecimal depositFee;

    @ApiModelProperty(value = "账户状态")
    private Boolean status;

    @ApiModelProperty(value = "微信id")
    private String openid;

    @ApiModelProperty(value = "上级邀请人ID")
    private Long parentId;

    @ApiModelProperty(value = "邀请代理的人头数")
    private Integer rts1;

    @ApiModelProperty(value = "邀请玩家的人头数")
    private Integer rts2;

    @ApiModelProperty("提现二维码")
    private String qrPay;

    @ApiModelProperty("刷新令牌过期时间")
    private LocalDateTime refreshExpiredTime;

    @ApiModelProperty("身份刷新令牌")
    private String refreshToken;

    @ApiModelProperty("素材")
    @DbJson
    private List<UploadResult> image;

    @ApiModelProperty("用户素材")
    @DbJson
    private List<UploadResult> imageUser;
}
